package com.hejing.面向对象特征之二_继承.初识继承;

/**
 * ClassName: ExtendsTest
 * Package: com.hejing.面向对象特征之二_继承
 * Description:
 *
 * @Author: HeJing
 * @Create: 2023-03-25 19:26
 * @Version: 1.0
 */
public class ExtendsTest {
    public static void main(String[] args) {
        Person p1 = new Person();
        p1.name = "Tom";
        p1.eat();

        Student s1 = new Student();
        s1.name = "lili";
        System.out.println(s1.getAge());

        s1.eat();
    }
}
























